Skip to content

[pkg/ottl] Add support for HasPrefix and HasSuffix #39825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025

Conversation

bogdandrutu
Copy link
Member

This enables to avoid regex cost (when using IsMatch) to check for prefix and suffix for strings.

Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the ottlfuncs/README as well

@bogdandrutu bogdandrutu force-pushed the has-suffix-prefix branch from 57f1ccb to fd59719 Compare May 2, 2025 17:31
@sfc-gh-bdrutu
Copy link

Please update the ottlfuncs/README as well

Done.

@bogdandrutu bogdandrutu force-pushed the has-suffix-prefix branch from fd59719 to 48ced98 Compare May 2, 2025 17:34
@bogdandrutu bogdandrutu requested a review from TylerHelmuth May 2, 2025 19:55
Copy link
Contributor

@edmocosta edmocosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add an e2e test for each function?

@bogdandrutu
Copy link
Member Author

Could you please add an e2e test for each function?

Done

@bogdandrutu bogdandrutu force-pushed the has-suffix-prefix branch from 48ced98 to 07bd890 Compare May 5, 2025 20:42
@bogdandrutu bogdandrutu force-pushed the has-suffix-prefix branch from 07bd890 to 358a5d4 Compare May 5, 2025 20:42
@bogdandrutu bogdandrutu merged commit 6aaddb0 into open-telemetry:main May 5, 2025
172 of 173 checks passed
@bogdandrutu bogdandrutu deleted the has-suffix-prefix branch May 5, 2025 21:30
@github-actions github-actions bot added this to the next release milestone May 5, 2025
@mx-psi mx-psi mentioned this pull request May 6, 2025
mx-psi added a commit that referenced this pull request May 6, 2025
- **[receiver/prometheus] Upgrade
receiver.prometheus.removeLegacyResourceAttributes feature flag
(#39803)**
- **Feature/update library versions (#39848)**
- **metricstarttimeprocessor: Implementation of the subtractinitial
strategy (#38594)**
- **[mongodbatlasreceiver] Add baseURL config (#39345)**
- **[receiver/splunkenterprise] Unexport InfoEntry and InfoContent
(#39830)**
- **[pkg/ottl] Add support for HasPrefix and HasSuffix (#39825)**
- **[receiver/snowflakereceiver] fix(security): CVE-2025-46327 :
Upgraded gosnowflake to v1.13.3 (#39862)**
- **[pkg/winperfcounters] Add support to retrieve raw values (#39835)**
- **Update All github.com/aws packages (#39867)**
- **use a single version**

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Signed-off-by: Ridwan Sharif <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Co-authored-by: Curtis Robert <[email protected]>
Co-authored-by: Ramachandran A G <[email protected]>
Co-authored-by: Antoine Toulme <[email protected]>
Co-authored-by: Ridwan Sharif <[email protected]>
Co-authored-by: Artur Santos <[email protected]>
Co-authored-by: Christos Markou <[email protected]>
Co-authored-by: Edmo Vamerlatti Costa <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bogdan Drutu <[email protected]>
Co-authored-by: Paulo Janotti <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <[email protected]>
vincentfree pushed a commit to ing-bank/opentelemetry-collector-contrib that referenced this pull request May 6, 2025
)

This enables to avoid regex cost (when using IsMatch) to check for
prefix and suffix for strings.

Signed-off-by: Bogdan Drutu <[email protected]>
vincentfree pushed a commit to ing-bank/opentelemetry-collector-contrib that referenced this pull request May 20, 2025
)

This enables to avoid regex cost (when using IsMatch) to check for
prefix and suffix for strings.

Signed-off-by: Bogdan Drutu <[email protected]>
dragonlord93 pushed a commit to dragonlord93/opentelemetry-collector-contrib that referenced this pull request May 23, 2025
)

This enables to avoid regex cost (when using IsMatch) to check for
prefix and suffix for strings.

Signed-off-by: Bogdan Drutu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants